package com.citycloud.ccuap.tc.admin.enums;

public enum ProjectFuntionType {

    /** 顶级菜单 */
    TopMenu("顶级菜单",(short)0),

    /** 叶子 */
    leaf("叶子",(short)2),

    /** 节点 */
    node("节点",(short)1),

    /** 按钮 */
    button("按钮",(short)3);

    ProjectFuntionType (String name,short value){
        this.name = name;
        this.value = value;
    }

    /**
     * 值
     */
    private short value;

    /**
     * 名称
     */
    private String name;

    public static short getValueByType(String type){
        for(ProjectFuntionType e:ProjectFuntionType.values()){
            if(e.name.equals(type)){
                return e.value;
            }
        }
        return -1;
    }
}
